<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="jquery-3.6.0.js"></script>
    <title>Document</title>
</head>
<body>
    <div id="example1"></div>
    <script src="pdfobject.js"></script>
    <script>
        function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
            if (r != null) return unescape(r[2]); return null; //返回参数值
        }
     var id = getUrlParam('id');
     PDFObject.embed(id, document.body);
    </script>
    <style>
        .pdfobject { border: 1px solid #666; }
        </style>
</body>
</html>